package com.film.controller.account;

import com.film.service.impl.account.RegisterServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

//注册接口
@RestController
public class RegisterController {
    @Autowired
    private RegisterServiceImpl registerService;

    @PostMapping("/account/register")
    public Map<String,String> register(@RequestParam (value = "username") String username, @RequestParam (value = "password") String password, @RequestParam (value = "confirmedPassword") String confirmedPassword) {

        return registerService.register(username, password, confirmedPassword);
    }
}
